package com.example.activity_service.dao;


import com.example.activity_service.vo.Red;
import com.example.activity_service.vo.Usersj;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface LZCdao {

    @Select("select * from hongbao ")
    List<Usersj> Query();

    @Select("select account from user_login where user_id=${user_id}")
    String userid(int user_id);



    @Insert("insert into hongbao (redenvelopes,instructions,preferentialway,parvalue,threshold,totalissued,collectiontime,timedata,scopeofapplication,receivingrules,users,receive,sharingoffers,status)values(#{redenvelopes},#{instructions},#{preferentialway},#{parvalue},#{threshold},#{totalissued},NOW(),date_sub(NOW(),interval -3 day),#{scopeofapplication},#{receivingrules},#{users},#{receive},#{sharingoffers},#{status})")
    int xzjd(Red red);

//    @Select("select account,tel from user_login where account=${account} and tel=${tel}")
//    List<Userdl> dlu(String account, String tel);

}
